<!--
*@Author: QWP
*@Description: 业务分割块
*@Date: 2023-06-29 17:32:47
-->
<template>
  <div class="u-busi-item">
    <div class="u-busi-title" v-if="title != '' || label != ''">
      <i :class="getIcon" class="u-preffix-icon"
        v-if="icon != ''">
      </i>
      {{ title ? title : (label || '') }}
      <slot name="title"></slot>
    </div>
    <div class="u-busi-box">
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'u-busi-item',
  props: {
    icon: {
      type: String,
      default: ""
    },
    title: {
      type: String,
      default: ""
    },
    label: {
      type: String,
      default: ""
    }
  },
  data () {
    return {}
  },
  computed: {
    getIcon() {
      const itype = {
        jbxx: 'iconfont icon-jibenxinxi',  // 基本信息
        bxpz: 'iconfont icon-baoxiaopingzheng', // 报销凭证
        ydfk: 'iconfont icon-yuedingfukuan', // 约定付款
        file: 'iconfont icon-fujianshangchuan', // 附件上传
        bxmx: 'iconfont icon-baoxiaomingxi', // 报销明细
      }
      return itype[this.icon] || this.icon || ''
    }
  },
  mounted() {},
  methods: {}
}
</script>
<style lang='scss'>
.u-busi-item {
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  padding: 0 0 6px;
  background: #FFFFFF;
  box-shadow: 0px 1px 2px 0px rgba(0,0,0,0.1);
  border-radius: 8px 8px 8px 8px;
  overflow: hidden;
  .u-busi-title {
    // margin-bottom: 12px;
    display: block;
    height: 45px;
    padding: 0 12px;
    font-size: 18px;
    line-height: 35px;
    font-family: Nunito-Regular, Nunito;
    font-weight: 400;
    // color: #333333;
    color: #000;
    box-sizing: border-box;
    // background: url('./../../../assets/busiitem/header_bg.jpg');
    background: #dbe6ff;
    // background: #F2F3F5;
    background-size: 100% 100%;
    .u-preffix-icon {
      margin-right: 8px;
      font-size: 18px;
    }
  }
  .u-busi-box {
    padding: 6px;
  }
  .u-eidt-table-box {
    .a-layout-header {
      display: flex;
      padding-top: 0 !important;
      padding-bottom: 6px !important;
      .el-button {
        &:first-child {
          margin-left: 0;
        }
      }
    }
  }
  .u-edit-table-no-header {
    margin-top: unset;
  }
}
.u-busi-item.clear {
  .u-busi-title {
    background-image: unset;
    color: #333;
  }
}
</style>